#include "widget.h"
#include "ui_widget.h"
#include<QDate>
#include<QDebug>

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
}

Widget::~Widget()
{
    delete ui;
}


void Widget::on_calendarWidget_selectionChanged()
{
    QDate date=ui->calendarWidget->selectedDate();
    ui->calendarWidget->setGridVisible(true);
    ui->calendarWidget->setNavigationBarVisible(true);
//    ui->calendarWidget->verticalHeaderFormat();
//    QDate date=ui->calendarWidget->minimumDate();
//    QDate date=ui->calendarWidget->maximumDate();
    Qt::DayOfWeek dayofweek=ui->calendarWidget->firstDayOfWeek();
//    qDebug()<<date;
    qDebug()<<dayofweek;
    ui->label->setText(date.toString());
//    ui->label->setText(QString(dayofweek));

}
